
<form id="form_edit">
<input type="hidden" name="id" value="{[$smarty.request.id]}" />
<input type="hidden" name="type" id="type" value="{[$result.type]}" />
  <table>	
	<tr>
		<td align="right">分类：</td>
		<td colspan="3"><input type="text" name="category" id="category" size="20" value="{[$result.category]}">
		<select name='category_t' id='category_t'>
      {[html_options options=$category_option selected=-]}
      </select></td>
	</tr>
	<tr>
		<td width="20%" align="right">类型：</td>
		<td width="30%">{[$result.type_t]}</td>
		<td width="20%" align="right">分值：</td>
		<td width="30%"><input type="text" name="score" value="{[$result.score]}" size="8"></td>
	</tr>
	<tr>
		<td align="right">题目：</td>
		<td colspan="3"><textarea rows="2" name="name" cols="55">{[$result.name]}</textarea></td>
	</tr>
	<tr id="item_label">
		<td align="right">选项：</td>
		<td colspan="3"><textarea rows="4" name="item" id="item" cols="55">{[$result.item]}</textarea></td>
	</tr>
	<tr>
		<td align="right">答案：</td>
		<td colspan="3">
		<div id="answer_label">
		{[foreach key=a item=b from=$result.item_t]}
		{[if $result.type eq '1' or $result.type eq '3']}
		<input type="radio" name="answer" value="{[$a]}" {[$b.c]}>
		{[/if]}
		{[if $result.type eq '2']}
		<input type="checkbox" name="answer_{[$a]}" value="{[$a]}" {[$b.c]}>
		{[/if]}		
		{[$b.v]}<br/>		
		{[/foreach]}
		
		{[if $result.type eq '4']}
		<input type="text" name="answer" value="{[$result.answer]}" size="20">
		{[/if]}
		
		{[if $result.type gt '4']}
		<textarea rows="4" name="answer" cols="55">{[$result.answer]}</textarea>
		{[/if]}
		</div>
		</td>
	</tr>	
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><textarea rows="2" name="content" cols="55">{[$result.content]}</textarea></td>
	</tr>
  </table>
</form>

<script type="text/javascript" src="js/exam/question/edit.js?r={[$smarty.now]}"></script>
